# coding=utf-8

import urllib.request
def getLocalHtml():
    fh = open('test.html', 'r', encoding='utf-8')
    html = ""
    lines = fh.readlines()
    for line in lines:
        html += line

    # 注释掉这个可以联网获取
    return html

def getHtml(url):
    headers = {
        # 'GET https': '//www.plazmaburst2.com/?s=1&a=&_sect=1 HTTP/1.1',
        # 'Host': ' www.plazmaburst2.com',
        'Connection': 'keep-alive',
        'Upgrade-Insecure-Requests': ' 1',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36',
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
        'Accept-Language': ' zh-CN,zh;q=0.9',
        'Cookie': 'login=Guest_01371;password=aef8a1cf00e4549ddfac544e26b75e01',
    }
    request = urllib.request.Request(url=url, headers=headers)
    html = urllib.request.urlopen(request)
    return html

# 主函数
if __name__ == "__main__":
    urlTemplate = "https://www.plazmaburst2.com/?s=9&id="
    mapId = 1017449
    url = urlTemplate + mapId
    html = getLocalHtml()
    print(html)
    exit(0)